Storing and retrieving data from a hard disk of a disk drive or other storage media is essential to modern electronics. Large amounts of data are typically stored on storage media. As such, it is important to quickly and accurately transfer data from storage media to a host device.
One common form of storage media is the magnetic surface of a hard disk. Data is typically stored on the magnetic surface of a hard disk in units of blocks, and each block has a block size (e.g., 512 bytes). A disk drive typically includes a buffer memory for buffering data to be transferred to a host (e.g., a host computer). The host requests an integer number of blocks from the hard disk, and the actual payload is the number of blocks multiplied by the block size.
In the actual physical data transfer, however, data is usually sent as a series of frames, and a frame size has no correlation to a block size. Since the number of bytes in a block has no correlation to the number of bytes in a frame, it may be difficult to track exactly which data has been successfully sent to the host, especially if several frames are transmitted in response to a single request. This may lead to difficulties in error correction, as well as determining which space in the buffer memory can be cleared for new data.
One conventional method for accounting for transmitted data is simply to fill the entire buffer memory (or some threshold portion thereof) with as many of the requested blocks as possible, and then to transfer the entire contents of the buffer memory at once. While this method can improve in tracking exactly how much data is sent to the host, such a technique can lead to several disadvantages.
For example, a Fibre Channel (hereafter “FC”) interface provides a serial, multi-layered data transmission protocol for use with a range of storage and network protocols, and allows for relatively fast transfer of data. In the conventional buffer-based transmission method, however, space in the buffer cannot be cleared for re-use until the entire contents of the buffer have been transferred successfully. Thus, only one buffer transfer can be occurring at any given time, reducing the throughput from the storage media to the host.
Additionally, since buffer throughput is reduced, a larger buffer can be used to accommodate larger data requests more quickly. A larger buffer, however, leads to increased cost, as well as increased power consumption.
Another standard protocol for disk interfacing is Serial Attached Small Computer Interface (hereafter “SAS”). SAS is an interface technology that uses a serial, point-to-point technology to transmit data from an initiator device to one or more targets via “expander” devices that facilitate communication. However, SAS also suffers from problems related to a buffer-by-buffer transfer.
In particular, since data is transferred on a buffer-by-buffer basis, if there is any error in transmission of a frame to the host, transmission must be re-started completely from the beginning of the buffer, which may include re-loading the entire buffer from disk. For example, even if 85% of the buffer contents have been transferred successfully, an error at 86% may require that the first 85% be transferred again. Accordingly, the conventional method may lead to significant waste of time and delay.
In addition, an SAS interface using the conventional buffer-based transmission method also suffers from the drawbacks noted above, such as increased buffer space requirements, cost, and power consumption.